/*
 * Created by: Peter Weissbrod
 * Created: Saturday, November 03, 2007
 */
using System;
using Castle.ActiveRecord;

namespace EntityLayer.Entities
{
    [ActiveRecord(DiscriminatorValue = "Media")]
    public class Media : SalesItem
    {
        #region members
        private Enumerations.MediaTypes mediaType = Enumerations.MediaTypes.Null;
        #endregion

        #region properties
        [Property]
        public Enumerations.MediaTypes MediaType
        {
            get { return mediaType; }
            set { mediaType = value; }
        }
        #endregion

        #region methods
        public Media()
        {}
        public Media(string name, User user, decimal price, DateTime postDate, int year,
                     Enumerations.MediaTypes mediaType) : base(name, user, price, postDate, year)
        {
            this.mediaType = mediaType;
        }
        public new static Media[] FindAll()
        {
            return FindAll(typeof(Media)) as Media[];
        }
        #endregion
    }
}